﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:seui="clr-namespace:SqlExport">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Buttons.xaml" />
        <ResourceDictionary Source="Common.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="{x:Type seui:ScrollableTabControl}">
        <Style.Resources>

        </Style.Resources>
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type seui:ScrollableTabControl}">
                    <Grid KeyboardNavigation.TabNavigation="Local">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="3"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border Grid.Row="0" Margin="0,2,2,0" Background="{StaticResource ToolbarFillBrush}">
                            <DockPanel Margin="0" Grid.Row="0">
                                <Border x:Name="Border1" DockPanel.Dock="Left" BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="0,0,0,1">
                                    <seui:PathButton x:Name="PART_New" 
                                                     ToolTip="New Tab"
                                                     EnabledFill="#FFFFD700"
                                                     DisabledFill="#FF969696"
                                                     PressedFill="#FFFFA500"
                                                     Path="F1 M 7,0 L 8.5,5 L 13.5,5 L 9.4,8 L 11,13 L 7,9.6 L 3,13 L 4.6,8 L 0.5,5 L 5.5,5 Z" />
                                </Border>
                                <Border x:Name="Border2" DockPanel.Dock="Right" BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="0,0,0,1">
                                    <StackPanel Orientation="Horizontal">
                                        <RepeatButton Style="{StaticResource TabItemButtonStyle}" Name="PART_Left" ToolTip="Scroll Left" Interval="30" Delay="100">
                                            <Path x:Name="LeftPath" Stretch="Fill" StrokeThickness="0.5" Stroke="#FF606060" Fill="#FF969696" Data="F1 M 12,0.5 L 14,3 L 9,8 L 14,13 L 12,15 L 5,8 Z" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                                        </RepeatButton>
                                        <RepeatButton Style="{StaticResource TabItemButtonStyle}" Name="PART_Right" ToolTip="Scroll Right" Interval="30" Delay="100">
                                            <Path x:Name="RightPath" Stretch="Fill" StrokeThickness="0.5" Stroke="#FF606060" Fill="#FF969696" Data="F1 M 2,0.5 L 9,8 L 2,15 L 0,13 L 5,8 L 0,3 Z" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                                        </RepeatButton>
                                        <seui:PathButton x:Name="PART_Select" 
                                                         ToolTip="New Tab"
                                                         EnabledFill="#FF6495ED"
                                                         DisabledFill="#FF969696"
                                                         PressedFill="#FF4364A0"
                                                         Path="F1 M 2,0.5 L 7,6 L 12,0.5 L 14,3 L 7,10 L 0,3 Z" />
                                        <seui:PathButton Name="PART_Close" 
                                                         ToolTip="New Tab"
                                                         EnabledFill="#FFB83C3D"
                                                         DisabledFill="#FF969696"
                                                         PressedFill="#FF9D3838"
                                                         Path="F1 M 2,0.5 L 7,6 L 12,0.5 L 14,3 L 9,8 L 14,13 L 12,15 L 7,10 L 2,15 L 0,13 L 5,8 L 0,3 Z" />
                                    </StackPanel>
                                </Border>
                                <ScrollViewer x:Name="PART_ScrollViewer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0" Padding="0" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Disabled">
                                    <Border x:Name="Border3" BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="0,0,0,1">
                                        <StackPanel IsItemsHost="true" Margin="3,4,5,1" Orientation="Horizontal" Background="{x:Null}" KeyboardNavigation.TabIndex="1" />
                                    </Border>
                                </ScrollViewer>
                            </DockPanel>
                        </Border>
                        <Border Name="Border4" 
                                Grid.Row="1"
                                Background="{StaticResource TabItemSelectedBackground}"
                                BorderBrush="{StaticResource SolidBorderBrush}" 
                                BorderThickness="0,0,0,1" />
                        <Border Grid.Row="2" 
                                Background="{TemplateBinding Background}" 
                                KeyboardNavigation.TabNavigation="Local" 
                                KeyboardNavigation.DirectionalNavigation="Contained" 
                                KeyboardNavigation.TabIndex="2" >
                            <ContentPresenter Name="PART_SelectedContentHost" Margin="4" ContentSource="SelectedContent" />
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" SourceName="PART_Right" Value="True">
                            <Setter Property="Fill" TargetName="RightPath" Value="#FF6495ED"/>
                        </Trigger>
                        <Trigger Property="IsPressed" SourceName="PART_Right" Value="True">
                            <Setter Property="Fill" TargetName="RightPath" Value="#FF4364A0"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" SourceName="PART_Left" Value="True">
                            <Setter Property="Fill" TargetName="LeftPath" Value="#FF6495ED"/>
                        </Trigger>
                        <Trigger Property="IsPressed" SourceName="PART_Left" Value="True">
                            <Setter Property="Fill" TargetName="LeftPath" Value="#FF4364A0"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
                            <Setter TargetName="Border1" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
                            <Setter TargetName="Border2" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
                            <Setter TargetName="Border3" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
                            <Setter TargetName="Border4" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>